/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _CDB_H
#define _CDB_H

struct caw_cdb {
	u8 opc;
	u8 mask;
	u8 lba[8];
	u8 reserved1[3];
	u8 length;
	u8 reserved2;
	u8 control;
};

void setup_compare_and_write_cmd(struct caw_cdb *caw,
		sector_t sector, unsigned int nr_sectors);

int cdb_exec(struct block_device *bdev, int rw,
		char *buf, unsigned int buf_len,
		unsigned char *cmd);
#endif
